package wang.shuzhu;

public class lianxi {
    public static void main(String[] args) {

        int arr[] = {33, 5, 22, 44, 55}, max = arr[0];
        for (int i = 1; i < arr.length; i++) {

             /*   max = max > arr[i] ? max : arr[i]; (a>b?a:b)*/


            if(max<arr[i]){
                max=arr[i];
            }
        }
        System.out.println("max = " + max);
    }

}






       /*
        int arr[] = {33, 5, 22, 44, 55};
        int max = arr[0];
        for (int i = 1; i < 5 ; i++) {

            if (max < arr[i]) {
                max = arr[i];
            }


        }
        System.out.println("max = " + max);
   */



